home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
newrouts
/
addvars.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1997-06-12
|
5KB
|
170 lines
VERSION 4.00
Begin VB.Form frmAddVariables
Caption = "Add Variables"
ClientHeight = 3315
ClientLeft = 4065
ClientTop = 2850
ClientWidth = 6105
Height = 3720
Icon = "AddVars.frx":0000
Left = 4005
LinkTopic = "Form1"
ScaleHeight = 3315
ScaleWidth = 6105
Top = 2505
Width = 6225
Begin VB.CommandButton cmdDel
Caption = "&Del"
Height = 315
Left = 5160
TabIndex = 8
Top = 2550
Width = 840
End
Begin VB.TextBox txtNewVarDesc
BeginProperty Font
name = "Fixedsys"
charset = 0
weight = 400
size = 9
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 330
Left = 795
MaxLength = 35
TabIndex = 2
Top = 2535
Width = 4305
End
Begin VB.CommandButton cmdAbort
Caption = "&Abort"
Height = 300
Left = 3285
TabIndex = 5
Top = 2970
Width = 870
End
Begin VB.CommandButton cmdAddVar
Caption = "&Add Variables"
Height = 315
Left = 1980
TabIndex = 3
Top = 2970
Width = 1170
End
Begin VB.CommandButton cmdAdd
Caption = "&Add "
Height = 315
Left = 5175
TabIndex = 4
Top = 2205
Width = 840
End
Begin VB.TextBox txtNewVar
BeginProperty Font
name = "Fixedsys"
charset = 0
weight = 400
size = 9
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 330
Left = 795
MaxLength = 20
TabIndex = 1
Top = 2175
Width = 2535
End
Begin VB.ListBox lstVars
BeginProperty Font
name = "Fixedsys"
charset = 0
weight = 400
size = 9
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 1860
ItemData = "AddVars.frx":0442
Left = 105
List = "AddVars.frx":0444
TabIndex = 0
Top = 60
Width = 5895
End
Begin VB.Label Label2
Caption = "Desc :"
Height = 285
Left = 120
TabIndex = 7
Top = 2595
Width = 570
End
Begin VB.Label Label1
Caption = "Variable :"
Height = 285
Left = 120
TabIndex = 6
Top = 2190
Width = 690
End
Attribute VB_Name = "frmAddVariables"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Dim CurIndex%
Private Sub cmdAbort_Click()
Unload Me
End Sub
Private Sub cmdAdd_Click()
If txtNewVar.Text = "" Then
Beep
Else
lstStr$ = txtNewVar & Space(20 - Len(txtNewVar.Text)) & " " & Trim(txtNewVarDesc)
lstVars.AddItem lstStr$
lstVars.Refresh
txtNewVar.Text = ""
txtNewVarDesc.Text = ""
CurIndex = 0
End If
End Sub
Private Sub cmdAddVar_Click()
Dim i%
If lstVars.ListCount = 0 Then
Beep
Else
ReDim gParms(lstVars.ListCount - 1)
For i = 0 To lstVars.ListCount - 1
gParms(i) = lstVars.List(i)
Next i
End If
Unload Me
End Sub
Private Sub cmdDel_Click()
If txtNewVar.Text = "" Or CurIndex < 0 Then
Beep
Else
lstVars.RemoveItem CurIndex
lstVars.Refresh
txtNewVar.Text = ""
txtNewVarDesc.Text = ""
CurIndex = 0
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmAddVariables = Nothing
End Sub
Private Sub lstVars_Click()
If lstVars.ListCount = 0 Then Exit Sub
CurIndex = lstVars.ListIndex
txtNewVar.Text = Mid(lstVars.List(CurIndex), 1, 20)
If Len(lstVars.List(CurIndex)) > 21 Then
txtNewVarDesc.Text = Mid(lstVars.List(CurIndex), 22, Len(lstVars.List(CurIndex)) - 21)
End If
End Sub